#ifndef __44USINGCLASS_H__
#define __44USINGCLASS_H__

#include <iostream>
#include <string>

class UsingClass
{
private:
    std::string company;
    int shares;
    double share_val;
    double total_val;
    void set_tot()
    {
        total_val = shares * share_val;
    }

public:
    UsingClass();                                                  // 默认构造函数
    UsingClass(const std::string comp, long n = 0, double pr = 0); // 带有默认参数的带参构造器
    ~UsingClass();                                                 // 默认析构函数

    void acquire(const std::string &co, long n, double pr);
    void buy(long num, double price);
    void sell(long num, double price);
    void update(double price);
    void show() const;
    const UsingClass & top_val(const UsingClass & uc) const;
};


#endif // __44USINGCLASS_H__